using System.ComponentModel.DataAnnotations;
using UniversalAdmin.Domain.Enums;

namespace UniversalAdmin.Application.DTOs;

/// <summary>
/// 创建文章 DTO
/// </summary>
public class CreateArticleDto
{
  [Required(ErrorMessage = "标题不能为空")]
  [StringLength(255, ErrorMessage = "标题最长255字符")]
  public string Title { get; set; } = null!;

  public string Content { get; set; } = string.Empty;

  public string Summary { get; set; } = string.Empty;

  public ArticleStatus Status { get; set; } = ArticleStatus.Draft;

  public int? CategoryId { get; set; }
}